package com.spx.core.services;

import org.eclipse.rwt.SessionSingletonBase;

import com.spx.core.types.User;

public class RAPUserHolder implements UserSessionHolder
{
	
	
	public RAPUserHolder()
	{
		
	}



	

	@Override
	public User getUser()
	{
		 return UserHolder.getInstance().getUser();
	}
	
	@Override
	public void  setUser(User user)
	{
		UserHolder.getInstance().setUser(user);
	}
}



class UserHolder extends SessionSingletonBase implements UserSessionHolder  
{

	User user; 
	@Override
	public User getUser()
	{
		
		return user;
	}

	@Override
	public void setUser(User user)
	{
		this.user=user;
	}
	
	
	public static UserHolder getInstance()
	{
		
		return (UserHolder) getInstance(UserHolder.class);
	}
	
}


